<?php
namespace app\common\validate;

use think\Validate;

class Service extends Validate
{
    protected $rule = [
       'type' => 'require|in:1,2',
       'title' => 'require|max:100',
       'suffer' => 'max:100',
       'remark' => 'max:100',
       'service_type' => 'require|in:1,2',
       'service_time' => 'require',
       'price' => 'number',
       'pay_price' => 'number',
       'hint' => 'in:0,1',
       'pay_type' => 'require'
    ];
    protected $message = [
       'type.require' => '请选择需求类型',
       'type.in' => '需求类型错误',
       'title.require' => '请输入需求内容',
       'title.max' => '需求内容不得超过100个字符',
       'suffer.max' => '服务经验不得超过100个字符',
       'remark.max' => '注意事项不得超过100个字符',
       'service_type.require' => '请选择服务方式',
       'service_type.in' => '服务方式有误',
       'service_time.require' => '请输入服务时间',
       'price.number' => '金额有误',
       'pay_price.number' => '定金有误',
       'hint.in' => '参数hint有误',
       'pay_type.require' => '请输入收费方式'
    ];
    protected $scene = [
       
    ];
}
